(function() {
		var back_to_top = document.getElementsByClassName("back_to_top")[0];
		window.onload = scroll_top_change;
		window.onscroll = scroll_top_change;

		function scroll_top_change() {
			if (window.scrollY >= 900) {
				back_to_top.style.display = "block";
			} else {
				back_to_top.style.display = "none";
			}
		}
		var timer = "";
		back_to_top.onclick = function() {
			var y = 100;
			timer = setInterval(function() {
				document.documentElement.scrollTop -= y;
				y += 8;
				// console.log(1);
				if (document.documentElement.scrollTop <= 10) {
					clearInterval(timer);
				}
			}, 10)
		}
	})()
